﻿<%@ Page Language="C#" MasterPageFile="~/_console/_console.Master" AutoEventWireup="true"
    CodeBehind="role-list.aspx.cs" Inherits="SmartSpace.WebApp._console.core.role_list" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolderHead" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolderMenu" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolderTitle" runat="server">
    角色管理
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="ContentPlaceHolderToolbar" runat="server">
    <asp:HyperLink ID="_ctlLinkAdd" runat="server" NavigateUrl="~/_console/core/role-add.aspx">添加角色</asp:HyperLink>
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="ContentPlaceHolderContent" runat="server">
    <div class="box">
        <h2>角色列表</h2>
        <div class="block">
            <table class="list">
                <asp:Repeater ID="_ctlGridRole" runat="server">
                    <HeaderTemplate>
                        <thead>
                            <tr>
                                <th>Name
                                </th>
                                <th>Caption
                                </th>
                                <th>Operate
                                </th>
                            </tr>
                        </thead>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <tr>
                            <td>
                                <%# Eval("Name") %>
                            </td>
                            <td>
                                <%# Eval("Caption") %>
                            </td>
                            <td>
                                <a href='<%# Eval("Id","./role-user-list.aspx?id={0}") %>'>users</a>
                                <a href='./role-edit.aspx?id=<%# Eval("Id") %>'>edit</a>
                                <asp:LinkButton ID="_ctlCmdDelete" runat="server" OnClick="_ctlCmdDelete_Click" CommandArgument='<%# Eval("Id") %>' OnClientClick='<%# Eval("Name","return confirm(\"do you want delete role [{0}]\");")%>'>delete</asp:LinkButton>
                            </td>
                        </tr>
                    </ItemTemplate>
                    <FooterTemplate>
                    </FooterTemplate>
                </asp:Repeater>
        </div>
        </table>
    </div>
</asp:Content>
